<%@page import="java.io.Serializable"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="com.google.gson.Gson"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%!
	public class Detail implements Serializable{
		private static final long serialVersionUID = 1L;
		private String project;
	    private int size;
	    private double money;
	    private String name;
	    private String date;
	    private String recheck;
	    private String orderid;
	    public void setProject(String project) {
	         this.project = project;
	     }
	     public String getProject() {
	         return project;
	     }
	
	    public void setSize(int size) {
	         this.size = size;
	     }
	     public int getSize() {
	         return size;
	     }
	
	    public void setMoney(double money) {
	         this.money = money;
	     }
	     public double getMoney() {
	         return money;
	     }
	
	    public void setName(String name) {
	         this.name = name;
	     }
	     public String getName() {
	         return name;
	     }
	
	    public void setDate(String date) {
	         this.date = date;
	     }
	     public String getDate() {
	         return date;
	     }
	
	    public void setRecheck(String recheck) {
	         this.recheck = recheck;
	     }
	     public String getRecheck() {
	         return recheck;
	     }
	
	    public void setOrderid(String orderid) {
	         this.orderid = orderid;
	     }
	     public String getOrderid() {
	         return orderid;
	     }
		public Detail(String project, int size, double money, String name, String date, String recheck, String orderid) {
			super();
			this.project = project;
			this.size = size;
			this.money = money;
			this.name = name;
			this.date = date;
			this.recheck = recheck;
			this.orderid = orderid;
		}
		public Detail() {
			super();
		}
	     
	
	}

	public class Data implements Serializable{
		private static final long serialVersionUID = 1L;
		private List<Detail> detail;
		public List<Detail> getDetail() {
			return detail;
		}
		public void setDetail(List<Detail> detail) {
			this.detail = detail;
		}
	   
	
	}
%>
<%
	Gson gson=new Gson();
	Data data=new Data();
	List<Detail> details = new ArrayList<>();
	data.setDetail(details);
	int groupid=0;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
	for(int i=0;i<10;i++) {
		if(i%3==0) {
			groupid++;
		}
		Detail detail=new Detail("收费项目名称"+i, i+1, (i+1)*2.3, "农业银行", simpleDateFormat.format(new Date()), "李静", groupid+"");
		details.add(detail);
	}
	out.print(gson.toJson(data));
%>